
const arr1: Array<number> = [1, 2, 3, 4];

const arr2: number[] = [1, 2, 3, 4];

function sum (...args: number[]) {
  return args.reduce((prev, next) => prev + next, 0);
}